package guoanmaker.provider.business.model;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import guoanmaker.provider.helper.common.abstractobj.IdEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="t_provide_Commodity_serviceRange")
public class ProvideCommodityServiceRange extends IdEntity{
	
	@ManyToOne(fetch=FetchType.EAGER,optional=true)
	@JsonIgnoreProperties
	@JoinColumn(name="commodity_id")
	private ProvideCommodity commodity;
	
	@OneToOne
	private ProvideArea area;//县标识
	
	@OneToOne
	private ProvideCity city;//市标识
	
	@OneToOne
	private ProviderProvince province;//省级标识
	
	private Integer isPromotion;//是否促销 1:促销 2:不促销
	
	private Double commodityPrice; //商品现价
	
	private Double commodityPricePromotion;//商品促销价
	
	private Date startTime;//商品促销开始时间
	
	private Date endTime;//商品促销结束时间
	
	private Double  finalPrice;//最终价格
}
